<table class="table table-hover">
	<thead>
		<tr>
			<th></th>
			<th>菜单名称</th>
			<th>链接模块</th>
			<th>状态</th>
			<th>
				<div class="btn-group">
					<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle btn-sm" type="button">操作 <span class="caret"></span></button>
					<ul role="menu" class="dropdown-menu pull-right">
						<li><a href="javascript:AddMenu(1,0)" ><i class="fui-plus-circle"></i> 新增</a></li>
					</ul>
				</div>
			</th>
		</tr>
	</thead>
	<tbody>
	{{range .griddata}}
		<tr class="success">
			<th><span class="glyphicon glyphicon-plus" id="{{.Id}}" onclick='openmenu("{{.Id}}")'></span></th>
			<th>{{.Title}}</th>
			<th>{{.Name}}</th>
			<th>{{if eq .Status 2}} 启用
				{{else}} 禁用 {{end}}
			</th>
			<th>
				<div class="btn-group">
					<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle btn-xs" type="button">
						操作 <span class="caret"></span>
					</button>
					<ul role="menu" class="dropdown-menu pull-right">
						<li>
							<a href="javascript:AddMenu(2,{{.Id}})" >
								<i class="fui-plus-circle"></i> 新增
							</a>
						</li>
						<li>
							<a href="javascript:EditMenu({{.Id}})">
								<i class="fui-check-circle"></i> 编辑
							</a>
						</li>
						<li>
							<a href='javascript:DelMenu({{.Id}})'>
								<i class="fui-cross-circle"></i> 删除
							</a>
						</li>
						<li class="divider"></li>
						<li>
						{{if eq .Status 2}} 
							<a href='javascript:UpdateState({{.Id}},1)'>
								<span class="fui-lock"></span> 禁用
							</a>
						{{else}} 
							<a href='javascript:UpdateState({{.Id}},2)'>
								<span class="fui-checkbox-checked"></span> 启用
							</a>
						{{end}}
						</li>
					</ul>
				</div>
			</th>
		</tr>
		{{range .children}}
		<tr tag='{{.Pid}}' style="display: none;" >
			<th></th>
			<th>&emsp;{{.Title}}</th>
			<th>{{.Name}}</th>
			<th>{{if eq .Status 2}} 启用
				{{else}} 禁用 {{end}}</th>
			<th>
				<div class="btn-group">
					<button data-toggle="dropdown" class="btn btn-primary dropdown-toggle btn-xs" type="button">
						操作 <span class="caret"></span>
					</button>
					<ul role="menu" class="dropdown-menu pull-right">
						<li>
							<a href="javascript:EditMenu({{.Id}})">
								<i class="fui-check-circle"></i> 编辑
							</a>
						</li>
						<li>
							<a href='javascript:DelMenu({{.Id}})'>
								<i class="fui-cross-circle"></i> 删除
							</a>
						</li>
						<li class="divider"></li>
						<li>
						{{if eq .Status 2}} 
							<a href='javascript:UpdateState({{.Id}},1)'>
								<span class="fui-lock"></span> 禁用
							</a>
						{{else}} 
							<a href='javascript:UpdateState({{.Id}},2)'>
								<span class="fui-checkbox-checked"></span> 启用
							</a>
						{{end}}
						</li>
					</ul>
				</div>
			</th>
		</tr>
		{{end}}
	{{end}}
	</tbody>
</table>